#ifndef EVENTPOLLER_H_INCLUDED
#define EVENTPOLLER_H_INCLUDED

#include "Singleton.h"
#include "EventHandler.h"
#include <iostream>
#include <set>

class EventHandler;

class EventPoller : public Uncopyable
{
public:
	void Update();
	void AddHandler(EventHandler*);
	void RemoveHandler(EventHandler*);
private:
	EventPoller() {}
	friend class Singleton<EventPoller>;

	typedef std::set<EventHandler*> Handlers;
	Handlers m_handlers;
};

typedef Singleton<EventPoller> TheEventPoller; 
//only have 1 event poller to stop random events being noticed and instead queue events

#endif